/**
 * @param {string} s
 * @return {string}
 */
var reverseWords = function (s) {
  const wordArr = s.split(' ')
  const reverseArr = wordArr.reverse().filter(item => item)
  return reverseArr.join(' ')
}
